<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>ArduinoDistanceSensorLibrary: DistanceGP2Y0A41SK Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">ArduinoDistanceSensorLibrary
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.2 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_distance_g_p2_y0_a41_s_k.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_distance_g_p2_y0_a41_s_k-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">DistanceGP2Y0A41SK Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Inheritance diagram for DistanceGP2Y0A41SK:</div>
<div class="dyncontent">
<div class="center"><img src="class_distance_g_p2_y0_a41_s_k__inherit__graph.png" border="0" usemap="#_distance_g_p2_y0_a41_s_k_inherit__map" alt="Inheritance graph"/></div>
<map name="_distance_g_p2_y0_a41_s_k_inherit__map" id="_distance_g_p2_y0_a41_s_k_inherit__map">
<area shape="rect" id="node2" href="class_analog_distance_sensor.html" title="{AnalogDistanceSensor\n|# _refVoltage\l|+ AnalogDistanceSensor()\l+ begin()\l+ begin()\l+ getDistanceRaw()\l+ getDistanceVolt()\l+ setARefVoltage()\l}" alt="" coords="7,174,180,346"/><area shape="rect" id="node4" href="class_distance_sensor.html" title="{DistanceSensor\n|# _average\l|+ isCloser()\l+ isFarther()\l+ setAveraging()\l}" alt="" coords="35,5,152,125"/></map>
</div>
<div class="dynheader">
Collaboration diagram for DistanceGP2Y0A41SK:</div>
<div class="dyncontent">
<div class="center"><img src="class_distance_g_p2_y0_a41_s_k__coll__graph.png" border="0" usemap="#_distance_g_p2_y0_a41_s_k_coll__map" alt="Collaboration graph"/></div>
<map name="_distance_g_p2_y0_a41_s_k_coll__map" id="_distance_g_p2_y0_a41_s_k_coll__map">
<area shape="rect" id="node2" href="class_analog_distance_sensor.html" title="{AnalogDistanceSensor\n|# _refVoltage\l|+ AnalogDistanceSensor()\l+ begin()\l+ begin()\l+ getDistanceRaw()\l+ getDistanceVolt()\l+ setARefVoltage()\l}" alt="" coords="7,174,180,346"/><area shape="rect" id="node4" href="class_distance_sensor.html" title="{DistanceSensor\n|# _average\l|+ isCloser()\l+ isFarther()\l+ setAveraging()\l}" alt="" coords="35,5,152,125"/></map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab346b1774a0f4b96d044c593ba32186c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab346b1774a0f4b96d044c593ba32186c"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_distance_g_p2_y0_a41_s_k.html#ab346b1774a0f4b96d044c593ba32186c">DistanceGP2Y0A41SK</a> ()</td></tr>
<tr class="memdesc:ab346b1774a0f4b96d044c593ba32186c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br/></td></tr>
<tr class="memitem:a2f0f8b6df63c05284c8df23a363715d1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2f0f8b6df63c05284c8df23a363715d1"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_distance_g_p2_y0_a41_s_k.html#a2f0f8b6df63c05284c8df23a363715d1">getDistanceCentimeter</a> ()</td></tr>
<tr class="memdesc:a2f0f8b6df63c05284c8df23a363715d1"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_distance_g_p2_y0_a41_s_k.html#a2f0f8b6df63c05284c8df23a363715d1" title="getDistanceCentimeter(): Returns the distance in centimeters: between 4-36cm (3 &amp; 37 are boundary val...">getDistanceCentimeter()</a>: Returns the distance in centimeters: between 4-36cm (3 &amp; 37 are boundary values) <br/></td></tr>
<tr class="inherit_header pub_methods_class_analog_distance_sensor"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_analog_distance_sensor')"><img src="closed.png" alt="-"/>&nbsp;Public Member Functions inherited from <a class="el" href="class_analog_distance_sensor.html">AnalogDistanceSensor</a></td></tr>
<tr class="memitem:a089770021c7ba24cf24f6ad20b8616b8 inherit pub_methods_class_analog_distance_sensor"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a089770021c7ba24cf24f6ad20b8616b8"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_analog_distance_sensor.html#a089770021c7ba24cf24f6ad20b8616b8">AnalogDistanceSensor</a> ()</td></tr>
<tr class="memdesc:a089770021c7ba24cf24f6ad20b8616b8 inherit pub_methods_class_analog_distance_sensor"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br/></td></tr>
<tr class="memitem:aab16a8975b46d82ac9fd7077e839f35c inherit pub_methods_class_analog_distance_sensor"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aab16a8975b46d82ac9fd7077e839f35c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_analog_distance_sensor.html#aab16a8975b46d82ac9fd7077e839f35c">begin</a> ()</td></tr>
<tr class="memdesc:aab16a8975b46d82ac9fd7077e839f35c inherit pub_methods_class_analog_distance_sensor"><td class="mdescLeft">&#160;</td><td class="mdescRight">Begin function to set input pins: distancePin = A0. <br/></td></tr>
<tr class="memitem:a57a38f5fd395392d6a68e57bf2e86d4b inherit pub_methods_class_analog_distance_sensor"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_analog_distance_sensor.html#a57a38f5fd395392d6a68e57bf2e86d4b">begin</a> (int distancePin)</td></tr>
<tr class="memitem:afd371c93052963334be7677f08dae5b6 inherit pub_methods_class_analog_distance_sensor"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afd371c93052963334be7677f08dae5b6"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_analog_distance_sensor.html#afd371c93052963334be7677f08dae5b6">getDistanceRaw</a> ()</td></tr>
<tr class="memdesc:afd371c93052963334be7677f08dae5b6 inherit pub_methods_class_analog_distance_sensor"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_analog_distance_sensor.html#afd371c93052963334be7677f08dae5b6" title="getDistanceRaw(): Returns the distance as a raw value: ADC output: 0 -&gt; 1023">getDistanceRaw()</a>: Returns the distance as a raw value: ADC output: 0 -&gt; 1023 <br/></td></tr>
<tr class="memitem:af677a29eb12b0349ff34120c1d87ccd3 inherit pub_methods_class_analog_distance_sensor"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af677a29eb12b0349ff34120c1d87ccd3"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_analog_distance_sensor.html#af677a29eb12b0349ff34120c1d87ccd3">getDistanceVolt</a> ()</td></tr>
<tr class="memdesc:af677a29eb12b0349ff34120c1d87ccd3 inherit pub_methods_class_analog_distance_sensor"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_analog_distance_sensor.html#af677a29eb12b0349ff34120c1d87ccd3" title="getDistanceVolt(): Returns the distance as a Voltage: ADC Input: 0V -&gt; 5V (or 0V -&gt; 3...">getDistanceVolt()</a>: Returns the distance as a Voltage: ADC Input: 0V -&gt; 5V (or 0V -&gt; 3.3V) <br/></td></tr>
<tr class="memitem:a7e8c18ea2a45d5b683b6cb04139396c8 inherit pub_methods_class_analog_distance_sensor"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7e8c18ea2a45d5b683b6cb04139396c8"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_analog_distance_sensor.html#a7e8c18ea2a45d5b683b6cb04139396c8">setARefVoltage</a> (int _refV)</td></tr>
<tr class="memdesc:a7e8c18ea2a45d5b683b6cb04139396c8 inherit pub_methods_class_analog_distance_sensor"><td class="mdescLeft">&#160;</td><td class="mdescRight">setARefVoltage:set the ADC reference voltage: (default value: 5V, set to 3 for external reference value, typically 3.3 on Arduino boards) <br/></td></tr>
<tr class="inherit_header pub_methods_class_distance_sensor"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_distance_sensor')"><img src="closed.png" alt="-"/>&nbsp;Public Member Functions inherited from <a class="el" href="class_distance_sensor.html">DistanceSensor</a></td></tr>
<tr class="memitem:aaeb8f74df2282153123c30e07c775724 inherit pub_methods_class_distance_sensor"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaeb8f74df2282153123c30e07c775724"></a>
boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_distance_sensor.html#aaeb8f74df2282153123c30e07c775724">isCloser</a> (int threshold)</td></tr>
<tr class="memdesc:aaeb8f74df2282153123c30e07c775724 inherit pub_methods_class_distance_sensor"><td class="mdescLeft">&#160;</td><td class="mdescRight">isCloser: check whether the distance to the detected object is smaller than a given threshold <br/></td></tr>
<tr class="memitem:a4135f6f4c351c5f0d001dbedab118dc4 inherit pub_methods_class_distance_sensor"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4135f6f4c351c5f0d001dbedab118dc4"></a>
boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_distance_sensor.html#a4135f6f4c351c5f0d001dbedab118dc4">isFarther</a> (int threshold)</td></tr>
<tr class="memdesc:a4135f6f4c351c5f0d001dbedab118dc4 inherit pub_methods_class_distance_sensor"><td class="mdescLeft">&#160;</td><td class="mdescRight">isFarther: check whether the distance to the detected object is bigger than a given threshold <br/></td></tr>
<tr class="memitem:a77ec007235ec2e52d0e74507ec6afbc6 inherit pub_methods_class_distance_sensor"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a77ec007235ec2e52d0e74507ec6afbc6"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_distance_sensor.html#a77ec007235ec2e52d0e74507ec6afbc6">setAveraging</a> (int avg)</td></tr>
<tr class="memdesc:a77ec007235ec2e52d0e74507ec6afbc6 inherit pub_methods_class_distance_sensor"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_distance_sensor.html#a77ec007235ec2e52d0e74507ec6afbc6" title="setAveraging(int avg): Sets how many samples have to be averaged in getDistanceCentimeter, default value is 1.">setAveraging(int avg)</a>: Sets how many samples have to be averaged in getDistanceCentimeter, default value is 1. <br/></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_attribs_class_analog_distance_sensor"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_class_analog_distance_sensor')"><img src="closed.png" alt="-"/>&nbsp;Protected Attributes inherited from <a class="el" href="class_analog_distance_sensor.html">AnalogDistanceSensor</a></td></tr>
<tr class="memitem:a9afcdb39f6bf3b672b4e334aa5bcc360 inherit pro_attribs_class_analog_distance_sensor"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9afcdb39f6bf3b672b4e334aa5bcc360"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>_refVoltage</b></td></tr>
</table>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_distance_g_p2_y0_a41_s_k.html">DistanceGP2Y0A41SK</a></li>
    <li class="footer">Generated on Tue Dec 25 2012 03:39:34 for ArduinoDistanceSensorLibrary by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.1.2 </li>
  </ul>
</div>
</body>
</html>
